dccomicsfannonfandomcom-20200215-history
Help:Snippets
What is a Snippet? What the word "snippet" in this case refers to is the blurbs for each page that google uses in its search results, and that Facebook uses when you share pages on its timelines. It is usually between 150 and 200 characters. This blurb is captured by their crawlers and spiders (that's what they call the things that go out into the internet and find the pages to show you when you search). They find it in a few places, but - particularly in the case of Facebook - they tend to use the OpenGraph extension's "og:description" metatag (which is part of the html of the website, and not something we have access to, so don't worry about it). So what's the big deal? Here's the situation: we want those snippets to make people want to come to our site when they search for characters and comics, but things are not ideally set up for that to happen. We can't access "og:description" - for good reason. The "og:description" metatag is kept within the code of Wikia as a whole, not just our wiki. That is not for us to mess around with. We might break something. However, some part of Wikia's coding has decided that whatever is at the top of a page should be used for that snippet. Because of the complicated nature of , what's at the top of the page is usually a bunch of infobox code and junk that won't entice anyone to come read our wiki's pages. How we're dealing with the big deal As mentioned, Wikia uses whatever's at the top of a page to fill out "og:description". So, we devised a way to hide about 200 characters of text at the top of every Character page, and that has shown to be a successful workaround for getting google and Facebook to read real descriptions instead of spewing infobox info. The trick, though, is that we don't want to have to write a description for every single character in existence - and it would be a problem if that piece of text were vandalized in some way. So, we had to automate it. What happens right now is that the code checks to see if the character's pagename (minus the earth-designation), real name, or current alias is a disambig - in that order - and if so, it uses the first 200 characters from that disambig's description field to provide a snippet. However, if for some reason those don't work in a desirable way (for example, if every one of those is a redirect to a different disambig, or if the one that does work is a disambig for a different version of the character) we can create a special template called "Template:PAGENAME snippet" to write a tailored 150-175 character description for google results and facebook shares. What happens if Wikia comes up with a better method? Well, we should probably remove the code from the character template, and delete this help page, huh? Potential for Vandalism Yes, there is potential that some fool could override the automated snippet grabs by creating a custom snippet template for the page, the hope is that nobody of that ilk would bother to read a help page, particularly one so technical, and would not otherwise figure out what those templates do. So, keep the secret, smarter and kinder users. Category:Policies